<!doctype html>
<html lang="zh-CN">
<head>
{include file="home_template/mz_static" title="$title" keywords="$site_info.site_seo_keywords" description="$site_info.site_seo_description" /}
</head>

<body class="user-select single" style="overflow:hidden;">

{include file="home_template/mz_header" /}

<section class="container">
<div class="content-wrap">
<div class="content">



{//*******************文章标题*******************}
<header class="article-header">
  <h1 class="article-title"><a>{$article.title}</a></h1>
  <div class="article-meta">
    <span class="item article-meta-time">
      <time class="time" data-toggle="tooltip" data-placement="bottom" title="时间：{$article.update_time|date='Y-m-d H:i'}">
        <i class="glyphicon glyphicon-time"></i> {$article.update_time|date='Y-m-d H:i'}
      </time>
    </span>
    <span class="item article-meta-source" data-toggle="tooltip" data-placement="bottom" title="作者：{$article.usernick}">
      <i class="glyphicon glyphicon-user"></i> {$article.usernick}
    </span>
    <span class="item article-meta-category" data-toggle="tooltip" data-placement="bottom" title="栏目：{$article.category}">
      <i class="glyphicon glyphicon-list"></i> <a href="program" title="{$article.category}">{$article.category}</a>
    </span>
    <span class="item article-meta-views" data-toggle="tooltip" data-placement="bottom" title="查看：{$article.browse|floor}">
      <i class="glyphicon glyphicon-eye-open"></i> 共{$article.browse|floor}人围观
    </span>
    <span class="item article-meta-comment" data-toggle="tooltip" data-placement="bottom" title="评论：{$article.comment|floor}">
      <i class="glyphicon glyphicon-comment"></i> {$article.comment|floor}个不明物体
    </span>
    {if isset($user['limit']) && in_array('Q64', explode(',',$user['limit']))}
    <span class="item article-meta-views">
      <i class="glyphicon glyphicon-eye-open"></i> <a href="{:url('article/article_browse',array('aid'=>$article['aid']))}" target="_blank">浏览记录</a>
    </span>
    {/if}
  </div>
</header>
{//*******************文章标题*******************}
{//*******************文章前置*******************}
{if 1>2}
<article class="article-content">
  <p><img data-original="__MZBLOG__/mz_bg/bg_02.png" src="__MZBLOG__/mz_bg/bg_02.png" /></p>
</article>
{/if}
{//*******************文章前置*******************}
{//******************文章主内容******************}
<script src="__MZBLOG__/highlight.js-9.12.0/highlight.min.js"></script>
<link href="__MZBLOG__/highlight.js-9.12.0/styles/monokai-sublime.min.css" rel="stylesheet">
<link rel="stylesheet" href="__MAINASSETS__/editormd/css/editormd.css" />
<article class="markdown-body editormd-html-preview" style="margin-bottom:30px;">{$article.test_html|raw}</article>
{//******************文章主内容******************}
{//***************文章点赞赏与分享***************}
{if 1==0}
<!-- <article class="article-content">
<link href="__CBTCSS__/social-share.js/1.0.16/css/share.min.css" rel="stylesheet">
<script src="__CBTCSS__/social-share.js/1.0.16/js/jquery.share.min.js"></script>
<div class="admired">
<div class="admired_div">
  <div class="praise"><i class="fa fa-heart-o"></i>喜欢(<span id="like_num">3</span>)</div>
  <div class="enjoy">
    <div class="pay_show slidebottoms">
      <div class="ps_con">
          <div class="ps_code">
              <img src="https://www.liangjucai.com/wx_skm.png">
          </div>
          <div class="ps_tab">
              <a data-type="2" class="active">微信</a>
              <a data-type="1">支付宝</a>
          </div>
          <span class="triangle"></span>
      </div>
    </div>
    赏
  </div>
  <div class="share">
    <div class="fx_show slidebottoms">
        <div class="ps_con" style="width:100%;">
            <div class='row' id="share-2"></div>
            <span class="triangle"></span>
        </div>
    </div>
    <i class="fa fa-share-alt"></i>分享
  </div>
</div>
</div>
<script>
$(document).ready(function(e){
  $('#share-2').share({sites: ['qzone', 'qq', 'weibo','wechat']});
});
$(".ps_tab a").click(function () {
  $(".ps_tab a").removeClass('active');
  $(this).addClass('active');
  if($(this).attr('data-type')==1){
      $(".ps_code img").attr('src',"https://www.liangjucai.com/zfb_skm.png");
  }else{
      $(".ps_code img").attr('src',"https://www.liangjucai.com/wx_skm.png");
  }
});
$(".praise").click(function(){
  $.post("https://www.liangjucai.com/articleLike",{'id':"112"},function(res){
      if(res.code == 200){
          layer.msg('大爷:) 点赞成功~',{time:1200});
          $("#like_num").html(parseInt($("#like_num").html())+1);
      }else{
          layer.msg('大爷:(  '+res.message,{time:1200});
      }
  },'json');
});
</script>
</article> -->
{/if}
<style>
.post-actions {
    text-align: center;
    overflow: hidden;
    padding: 15px 0 30px;
    clear: both;
}
.post-actions .action.action-like {
    background-color: #45B6F7;
}
.post-actions .action {
    display: inline-block;
    opacity: 0.8;
    line-height: 1;
    padding: 12px 20px;
    border-radius: 2px;
    color: #fff;
    font-size: 14px;
    background-color: #45B6F7;
    margin: 0 7px;
}
</style>
<div class="post-actions">
  <a href="javascript:;" etap="like" class="post-like action action-like" data-pid="7260">
    <i class="fa fa-thumbs-o-up"></i> 赞(<span>{$article.like|floor}</span>)
  </a>
</div>
<script>
$("a[etap='like']").click(function(event) {
  if($("a[etap='like']").attr('aot') == '1'){
    message.add("已经点过赞了哦");
    return false;
  }
  $.post("/article/json_article_like",
  {
      aid : "{$article.aid}",
  },
  function(data,status){
    if(data.state=='success'){
      $likenum = $("a[etap='like']").children('span').text();
      $("a[etap='like']").children('span').text(++$likenum);
      $("a[etap='like']").attr('aot','1');
      message.add("点赞成功","success");
    }else{
      message.add("点赞失败","error");
    }
  }).fail(function () {
    message.add("error响应，没有进入success","error");
  });
});
</script>

{//***************文章点赞赏与分享***************}

<article class="article-content">
<div class="art_page">
  <div class="art_page_prev">
    <a title="{$prev.title|default='没有了'}" href="{notempty name='$prev.aid'}/{$prev.aid}{else /}#{/notempty}" >上一篇：{$prev.title|default='没有了'}</a>
  </div>
  <div class="art_page_next">
    <a title="{$next.title|default='没有了'}" href="{notempty name='$next.aid'}/{$next.aid}{else /}#{/notempty}" >下一篇：{$next.title|default='没有了'}</a>
  </div>
</div>
<p class="article-copyright hidden-xs">自由转载请标明出处<a href="/">《梦幻空间站》</a>，本文网址 » <a href="/{$article.aid}">http:/www.soyul.cn/{$article.aid}</a></p>
</article>

<div class="relates">
  <div class="title">
    <h3>相关推荐</h3>
  </div>
  <ul>
    {foreach name="abouts" item="vol" }
      <li><a href="/{$vol.aid}">{$vol.title}</a></li>
    {/foreach}
  </ul>
</div>

{//************************************************************评论部分************************************************************}

{//********************评论框********************}
<div class="title" id="comment"><h3>评论<small>抢沙发</small></h3></div>
<!-- <div id="respond">
  <div class="comment-signarea">
    <h3 class="text-muted">评论前必须登录！</h3>
    <p>
      <a href="{:url('login/login')}" class="btn btn-default login" target="_blank" rel="nofollow">登录</a>&nbsp;&nbsp;
      <a class="btn btn-primary" data-toggle="modal" data-target="#loginModal" rel="nofollow">游客登录</a>&nbsp;&nbsp;
      <a href="{:url('login/register')}" class="btn btn-default register" target="_blank" rel="nofollow">注册</a>
    </p>
  </div>
</div> -->
<div id="respond">
<div class="comment">
  <div class="comment-title">
    {empty name="user.hport"}
    <img class="avatar" src="/static/main/noavatar_small.gif" />
    {else /}
    <img class="avatar" src="{$user.hport}" />
    {/empty}
  </div>
  <div>
  <input class="comment_input comment_name" placeholder="姓名或昵称 (必填)" id="comment_name" name="nick"
  maxlength="15" tabIndex="1" value="{$user.nick}"/>
  <input class="comment_input comment_email" placeholder="邮箱(必填,将保密)以便回复您" id="comment_email" name="email"
  maxlength="50" tabIndex="2" value="{$user.email}"/>
  <input class="comment_input comment_url" placeholder="网站或博客 http://xxxx" id="comment_url" name="website"
  maxlength="50" tabIndex="3" value="{$user.website}"/>
  </div>
  <div class="comment-box">
    <textarea placeholder="您的评论可以一针见血" name="comment-textarea" id="comment-textarea" class="comment-textarea" cols="100%" rows="3" tabIndex="4"></textarea>
    <div class="comment-ctrl">
      <span class="emotion sss"><img src="https://www.liangjucai.com/Index/images/face/5.png" width="20" height="20" />表情</span>
      <div class="comment-prompt"><i class="fa fa-spin fa-circle-o-notch"></i><span class="comment-prompt-text">评论正在提交中...请稍后</span></div>
      <div class="comment-success" id="comok"><i class="fa fa-check"></i><span class="comment-prompt-text">评论提交成功...</span></div>
      <div class="comment-success" id="cinfo"><i class="fa fa-close"></i><span class="comment-prompt-text"></span></div>
      <button type="button" name="comment-submit" class="comment-submit" tabindex="5" articleid="1" data-id="0" onclick="comment(0,this)">评论</button>
    </div>
  </div>
</div>
</div>
{//********************评论框********************}


{//*******************评论内容*******************}
<style>
.w-94 { width:94% !important; }
.f-m-l { font-size:12px;margin-left:1px; }
.admin_controller > a { color:red; }
.com_del:hover { color:black; }
</style>
<div id="postcomments">
  {php}$count=count($comment);{/php}
  {volist name="comment" id="value"}
  <ol class="commentlist">
    <li class="comment-content" id="colm_{$value.id}">
      <div class="comment-hf">
        <div><span class="comment-f">#{$count}</span></div>
        <div><a class="comm_hf_btn" data-id="{$value.id}" onclick="reply({$value.id},this,1)">回复</a></div>
      </div>
      <div class="comment-avatar">
        {empty name="$uport[$value['user_id']]"}
          <span class="avatar">{$unick[$value.user_id]|mb_substr=0,1}</span>
        {else /}
          <img class="avatar" src="{$uport[$value['user_id']]}" style="background-color:transparent;" />
        {/empty}
      </div>
      <div class="comment-main">
        <p><a href="#" target="_blank">{$unick[$value['user_id']]}</a><span class="time">({$value.time|date='Y/m/d H:i:s'})</span>
        {if isset($user['limit']) && in_array('Q64', explode(',',$user['limit']))}
        <span class="admin_controller">
          <a class="com_del" href="{:url('index/comment_update',array('id'=>$value['id']))}" target="_blank">修改</a>&nbsp;
          <a class="com_del" onclick="json_comment_delete({$value.id},this)">删除</a>
        </span>
        {/if}
        <br /><span class="useressay">{$value.essay}</span></p>
      </div>
    </li>
    {present name="value['zclass']"}
    {volist name="value.zclass" id="vol"}
    <li class="comment-content comm_list w-94" id="colm_{$vol.id}">
      <div class="comment-hf">
        <div><span class="comment-f">&nbsp;&nbsp;&nbsp;&nbsp;</span></div>
        <div><a class="comm_hf_btn" data-id="{$vol.id}" onclick="reply({$vol.id},this,0)">回复</a></div>
      </div>
      <div class="comment-avatar">
        {empty name="$uport[$vol['user_id']]"}
          <span class="avatar">{$unick[$vol.user_id]|mb_substr=0,1}</span>
        {else /}
          <img class="avatar" src="{$uport[$vol['user_id']]}" style="background-color:transparent;" />
        {/empty}
      </div>
      <div class="comment-main">
        <p><a href="#" target="_blank">{$unick[$vol['user_id']]}</a>
          <span class="f-m-l">回复</span>
          <a class="f-m-l" href="#" target="_blank">@ {$unick[$vol['sayto']]}</a>
          <span class="time">({$vol.time|date='Y/m/d H:i:s'})</span>
          {if isset($user['limit']) && in_array('Q64', explode(',',$user['limit']))}
          <span class="admin_controller">
            <a class="com_del" href="{:url('index/comment_update',array('id'=>$vol['id']))}" target="_blank">修改</a>&nbsp;
            <a class="com_del" onclick="json_comment_delete({$vol.id},this)">删除</a>
          </span>
          {/if}
          <br /><span class="useressay">{$vol.essay}</span>
        </p>
      </div>
    </li>
    {/volist}
    {/present}
  </ol>
  {php}$count--;{/php}
  {/volist}
</div>
{//*******************评论内容*******************}





</div>
</div>
<aside class="sidebar">
  <div class="fixed">
    {//******************公告四栏目******************}
    <div class="widget widget-tabs">
      <ul class="nav nav-tabs" role="tablist">
        <li role="presentation" class="active"><a href="#notice" aria-controls="notice" role="tab" data-toggle="tab">网站公告</a></li>
        <li role="presentation"><a href="#centre" aria-controls="centre" role="tab" data-toggle="tab">会员中心</a></li>
        <li role="presentation"><a href="#contact" aria-controls="contact" role="tab" data-toggle="tab">联系站长</a></li>
        <li role="presentation"><a href="#tongji" aria-controls="tongji" role="tab" data-toggle="tab">统计信息</a></li>
      </ul>
      <div class="tab-content">
        <div role="tabpanel" class="tab-pane notice active" id="notice">
          <ul>
            <li>
              <time datetime="2020-03-16">03-16</time>
              <a href="#">欢迎访问梦幻空间站博客</a>
            </li>
            <li>
              <time datetime="2020-01-06">01-06</time>
              <a href="#">在这里可以看到前端技术，后端程序，网站内容管理系统等文章，还有我的程序人生！</a>
            </li>
          </ul>
        </div>
        <div role="tabpanel" class="tab-pane centre" id="centre">
          {empty name="$user"}
          <h4>需要登录才能进入会员中心</h4>
          <p><a href="/login/login" class="btn btn-primary">立即登录</a> <a href="/login/register" class="btn btn-default">现在注册</a></p>
          {else /}
            {$user.nick}<br />
            {$user.autograph}
          {/empty}
        </div>
        <div role="tabpanel" class="tab-pane contact" id="contact">
          <h2>Email : <a href="mailto:choasmida@foxmail.com" data-toggle="tooltip" data-placement="bottom" title="choasmida@foxmail.com">859989925@qq.com</a></h2>
        </div>
        <div role="tabpanel" class="tab-pane contact" id="tongji">
          {if 1>2}
          <h2>日志总数:888篇</h2>
          <h2>网站运行:<span id="sitetime">88天 </span></h2>
          {/if}
        </div>
      </div>
    </div>
    {//******************公告四栏目******************}
    <div class="widget widget_search">
      <form class="navbar-form" action="/Search" method="post">
        <div class="input-group">
          <input type="text" name="keyword" class="form-control" size="35" placeholder="请输入关键字" maxlength="15" autocomplete="off">
          <span class="input-group-btn">
          <button class="btn btn-default btn-search" name="search" type="submit">搜索</button>
          </span> </div>
      </form>
    </div>
  </div>
  {//***************每日一句***************}
  <div class="widget widget_sentence">
    <h3>每日一句</h3>
    <div class="widget-sentence-content" style="min-height:100px;">
      <h4>{$erysts.dt}</h4>
      <p>{$erysts.co|raw}</p>
    </div>
  </div>
  {//***************热门文章***************}
  <div class="widget widget_hot">
    <h3>热门文章</h3>
    <ul>
      {foreach name="hotacl" item="vol" key="k" }
      <li>
        <a href="/{$vol.aid}" target="_blank">
          <span class="thumbnail"><img class="thumb" data-original="{$vol.cover_img1|default='__MZBLOG__/images/excerpt.jpg'}"
            src="{$vol.cover_img1|default='__MZBLOG__/images/excerpt.jpg'}" alt="{$vol.title}"></span>
          <span class="text">{$vol.title}</span>
          <span class="muted"><i class="glyphicon glyphicon-time"></i> {$vol.update_time|date='Y-m-d'}</span>
          <span class="muted"><i class="glyphicon glyphicon-eye-open"></i> {$vol.browse|floor}</span>
        </a>
      </li>
      {/foreach}
    </ul>
  </div>
</aside>
</section>

{include file="home_template/mz_footer" /}
<script>
//每日一句GET
$(document).ready(function(e){
  $.getJSON("https://api.ooopn.com/ciba/api.php",function(data){
    var day = new Date().getDay();
    var arr = new Array("日","一","二","三","四","五","六");
    var dt  = data['date'].replace(/(\d{4})\-(\d{2})\-(\d{2})/,"$1年$2月$3日") + '星期' +arr[day];
    var co  = data['ciba-en'] + '<br />' + data['ciba'];
    $("#ciba_dt").text(dt);
    $("#ciba_co").html(co);
  });
});
</script>
{//QQ分享组件}
<script src="https://www.liangjucai.com/Index/js/jquery.qqFace.js"></script>
<script>
$(document).ready(function(e){
  $('.sss').qqFace({
      id: 'facebox',
      assign: 'comment-textarea',
      path: '__MZBLOG__/images/arclist/'  //表情存放的路径
  });
});
</script>
{//QQ分享组件}
{//回复按钮点击与添加评论框}
<div id="respond" name="reply_model" style="display:none;">
<div class="comment">
  <div class="comment-title">
    {empty name="user.hport"}
    <img class="avatar" src="/static/main/noavatar_small.gif" />
    {else /}
    <img class="avatar" src="{$user.hport}" />
    {/empty}
  </div>
  <div>
  <input class="comment_input comment_name" placeholder="姓名或昵称 (必填)" id="comment_name" name="nick" maxlength="15" tabIndex="1" value="{$user.nick}"/>
  <input class="comment_input comment_email" placeholder="邮箱(必填,将保密)以便回复您" id="comment_email" name="email" maxlength="50" tabIndex="2" value="{$user.email}"/>
  <input class="comment_input comment_url" placeholder="网站或博客 http://xxxx" id="comment_url" name="website" maxlength="50" tabIndex="3"value="{$user.website}"/>
  </div>
  <div class="comment-box">
      <textarea placeholder="您的评论可以一针见血" name="comment-textarea" id="comment-textarea" class="comment-textarea" cols="100%" rows="3" tabIndex="4"></textarea>
      <div class="comment-ctrl">
        <span class="emotion sss"><img src="https://www.liangjucai.com/Index/images/face/5.png" width="20" height="20" />表情</span>
        <div class="comment-prompt"><i class="fa fa-spin fa-circle-o-notch"></i><span class="comment-prompt-text">评论正在提交中...请稍后</span></div>
        <div class="comment-success" id="comok"><i class="fa fa-check"></i><span class="comment-prompt-text">评论提交成功...</span></div>
        <div class="comment-success" id="cinfo"><i class="fa fa-close"></i><span class="comment-prompt-text"></span></div>
        <button type="button" id="comment-submit" class="comment-submit">评论</button>
      </div>
  </div>
</div>
</div>
<script>
//点击回复按钮
function reply($id,that,$st){
  $("div[name='reply_model_this']").remove();
  $("#comment-submit").attr('onclick','comment('+$id+',this)');
  $html = '<div id="respond" name="reply_model_this">' + $("div[name='reply_model']").html() + '</div>';
  if($st==1){
    $(that).parent().parent().parent().after($html);
  }else{
    $(that).parent().parent().parent().append($html);
  }
}
</script>
{//回复按钮点击与添加评论框}
<script>
//提交留言
function comment($id,that){
  $(that).parent().children(".comment-prompt").show();
  $(that).parent().children(".comment-success").hide();
  $.post("{:url('index/submit_comments')}",
  {
    nick    : $(that).parent().parent().parent().children("div").children("input[name='nick']").val(),
    email   : $(that).parent().parent().parent().children("div").children("input[name='email']").val(),
    website : $(that).parent().parent().parent().children("div").children("input[name='website']").val(),
    comment : $(that).parent().parent().children("textarea[name='comment-textarea']").val(),
    aid     : "{$article.aid}",
    reply   : $id,
  },
  function(data,status){
    $(that).parent().children(".comment-prompt").hide();
    if(data.state=='success'){
      $(that).parent().children("#comok").show();
      if($id=='0'){ //主評論模板
        $html = '<ol class="commentlist" id="coml_'+data.id+'"><li class="comment-content"><div class="comment-hf"><div><span class="comment-f">&nbsp;&nbsp;&nbsp;&nbsp;</span></div><div><a class="comm_hf_btn text-danger" data-id="'+data.id+'" onclick="recall('+data.id+',this)">撤回</a></div></div><div class="comment-avatar"><span class="avatar">'+data.nick.substring(0,1)+'</span></div><div class="comment-main"><p><a href="#" target="_blank">'+data.nick+'</a><span class="time">('+data.time+')</span><br /><span class="useressay">'+data.essay+'</span></p></div></li></ol>';
        $("#postcomments").prepend($html);
        $(that).parent().parent().children("textarea[name='comment-textarea']").val('');
        $(that).parent().children(".comment-success").hide();
      }else{        //副評論模板
        $html = '<li class="comment-content comm_list w-94" id="coml_'+data.id+'"><div class="comment-hf"><div><span class="comment-f">&nbsp;&nbsp;&nbsp;&nbsp;</span></div><div><a class="comm_hf_btn text-danger" data-id="'+data.id+'" onclick="recall('+data.id+',this)">撤回</a></div></div><div class="comment-avatar"><span class="avatar">'+data.nick.substring(0,1)+'</div><div class="comment-main"><p><a href="#" target="_blank">'+data.nick+'</a><span class="f-m-l">回复</span><a class="f-m-l" href="#" target="_blank">@ '+data.retnick+'</a><span class="time">('+data.time+')</span><br /><span class="useressay">'+data.essay+'</span></p></div></li>';
        $("#colm_"+$id).parent().append($html);
        $(that).parent().parent().children("textarea[name='comment-textarea']").val('');
        $(that).parent().children(".comment-success").hide();
        $("div[name='reply_model_this']").remove();
      }
      replace_em(); //替换评论中的表情
    }else{
      $(that).parent().children("#cinfo").children("span").text(data.info);
      $(that).parent().children("#cinfo").show();
    }
  });
}
//撤回留言
function recall($id,that){
  if(confirm('确认撤回此条信息吗？两分钟之内可撤回')===true){
    $.post("/index/json_comment_recall",
    {
        id : $id,
    },
    function(data,status){
      if(data.state=='success'){
        message.add(data.info,'success');
        $("#coml_"+$id).remove();
      }else{
        message.add(data.info,'error');
      }
    }).fail(function () {
      message.add('error响应，没有进入success','error');
    });
  }else{
    return 0;
  }
}
</script>
{if isset($user['limit']) && in_array('Q64', explode(',',$user['limit']))}
<script>
// 修改留言
function json_comment_update(){
  
}
// 删除留言
function json_comment_delete($id,that){
  if(confirm('确认删除此留言吗？')===true){
    $.post("/index/json_comment_delete",
    {
        id : $id,
    },
    function(data,status){
      if(data.state=='success'){
        message.add(data.info,'success');
        $("#colm_"+$id).remove();
      }else{
        message.add(data.info,'error');
      }
    }).fail(function () {
      message.add('error响应，没有进入success','error');
    });
  }else{
    return 0;
  }
}
</script>
{/if}
<script>
// 替换评论中的表情
function replace_em(){
  $(".useressay").each(function(index, el) {
    $comment = $(this).html();
    $comment = $comment.replace(/\[em_([0-9]*)\]/g,'<img src="__MZBLOG__/images/arclist/$1.gif" border="0" />');
    $(this).html($comment);
  });
}
replace_em();
</script>
</body>
</html>